package br.com.linkers.controller;

import java.io.IOException;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;


@ManagedBean
@SessionScoped
public class Utils {

	int numAlternado =1;

	public int getNumAlternado() {
		
		if(numAlternado==1)
			numAlternado=0;
		else
			numAlternado=1;
		
		return numAlternado;
	}

	public void setNumAlternado(int numAlternado) {
		this.numAlternado = numAlternado;
	}
	
	
	public void redirect(String context) throws IOException{
		FacesContext.getCurrentInstance().getExternalContext().redirect(context+".xhtml");
	}
	
	
	
}
